//package com.kfm.wiki.mq;
//
//import com.kfm.wiki.socket.WsService;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.rocketmq.common.message.MessageExt;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.slf4j.MDC;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
////@Component
//@Slf4j
////@RocketMQMessageListener(consumerGroup = "wiki-group", topic = "VOTE_TOPIC")
//public class RocketMqConsumer implements RocketMQListener<MessageExt> {
//
//    @Autowired
//    private WsService wsService;
//
//    @Override
//    public void onMessage(MessageExt message) {
//        byte[] body = message.getBody();
//        String msg = new String(body);
//        log.info("收到消息：{}" , msg);
//        wsService.send(msg, MDC.get("LOG_ID"));
//    }
//}
